#ifndef QTRENDPANELWIDGET_H
#define QTRENDPANELWIDGET_H

#include <QWidget>

#include "qwavewidget.h"

struct tagDataLineConfig
{
    bool        m_visible;
    QColor      m_color;
    QString     m_unit;
};

class QTrendPanelWidget : public QWidget
{
    Q_OBJECT
public:
    explicit QTrendPanelWidget(QWidget *parent = 0);

    void    set_color(int line);

    void    set_visible(int line,bool visible);

    void    set_value(double *value, int line_count, int data_count);

    void    set_LButton_type(int type);

    void    scale(double l, double t,double r,double b);

    void    reset();

    void    clear();

    void    set_color();

    void    set_status(enTrendState status);
    enTrendState get_status();
protected:
    void    paintEvent(QPaintEvent *);
signals:
    void    status_changed(int status);
    void    color_changed(int line);
    void    clicked_value(const QString &text1,const QString &text2,const QString &text3,const QString &text4);
public slots:
protected:
    QWaveWidget *m_wave_widget;

public:
    tagDataLineConfig       m_config[4];
    int                     m_time_count;
};

#endif // QTRENDPANELWIDGET_H
